<%@ tag language="java" pageEncoding="utf-8" %>
<%@ attribute name="doc" type="com.eischet.lookup.web.SearchResult" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="lookup" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<div class="hit">
    <c:choose>
        <c:when test="${doc.listType == 'incident'}">
            <lookup:displayIncident doc="${doc}" />
        </c:when>
        <c:when test="${doc.listType == 'incidentworklog'}">
            <lookup:displayIncidentWorkLog doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'change'}">
            <lookup:displayChange doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'changeworklog'}">
            <lookup:displayChangeWorkLog doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'problem'}">
            <lookup:displayProblem doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'problemworklog'}">
            <lookup:displayProblemWorkLog doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'problemsolution'}">
            <lookup:displayProblemSolution doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'knownerror'}">
            <lookup:displayKnownError doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'knownerrorworklog'}">
            <lookup:displayKnownErrorWorkLog doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'servicerequest'}">
            <lookup:displayServiceRequest doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'servicerequestworklog'}">
            <lookup:displayServiceRequestWorkLog doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'task'}">
            <lookup:displayTask doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'taskworklog'}">
            <lookup:displayTaskWorkLog doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'workorder'}">
            <lookup:displayWorkOrder doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'workorderworklog'}">
            <lookup:displayWorkOrderWorkLog doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'service'}">
            <lookup:displayServiceItem doc="${doc}"/>
        </c:when>
        <c:when test="${doc.listType == 'item'}">
            <lookup:displayResourceItem doc="${doc}"/>
        </c:when>
        <c:otherwise>
            <div class="head">
                ${doc.listType}:<%doc.get("handle");%>
                <lookup:dump searchResult="${doc}" link="true" />
            </div>
            <div class="middle">
                No dedicated list view has been defined for this object type (${doc.listType}).
                <lookup:dump searchResult="${doc}" link="false" />
            </div>
            <div class="foot">
                --
            </div>
        </c:otherwise>
    </c:choose>
</div>
